<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
	   <style type="text/css">
	   	.icon-icon-test:before {
		    content: "\e602";
		    color: #EF8E02;
		    font-size: 1.3rem;
		    margin-right: 5px;
		}
		
		.icon-guize1:before {
		    content: "\e600";
		    font-size: 1.1rem;
		    margin-right: 7px;
		}
		
		.icon-icon-test:before {
			    content: "\e602";
			    color: #30a1f0;
			    font-size: 1.5rem;
			}
			
			.zoushi .zoushi_data .data table.table tbody tr td a.xq i{
				    color: #d73021;
			}
			
			.icon-guize1:before {
			    content: "\e600";
			    font-size: 1.2rem;
			}
			
			.klsf{
				width:30px !important;
				height: 30px !important;
			}
			
			.klsf1{
				width:40px !important;
				height: 40px !important;
			}
			
			.data table tbody tr td .prizeNumber>div{
			    display: -ms-flexbox;
			    display: flex;
			    -ms-flex-direction: column;
			    flex-direction: column;
			    -ms-flex-align: center;
			    align-items: center;
			}
			.data table tbody tr td .prizeNumber .lhc{
				background-color: transparent;
				color: #000;
				height: 54px;
			}
			.data table tbody tr td .prizeNumber .lhc .ball{
			    width: 30px;
			    height: 30px;
			    line-height: 30px;
			    margin: 4px;
			    color: #fff;
			    border-radius: 50%;
			    display: inline-table;
			}
			
			#roomId{
				border: 1px solid #999999;
			    height: 30px;
			    margin-top: 10px;
			}
			
			.pukeCard{
				width:30px;
				 height: 40px;
				 margin:0 3px;
				 border:1px solid #666;
			}
			
			.bjlCard{
				margin-top: 30px;
			}
			
			.zhuangName{
				display: inline-block;
   				margin-right: 5px;
			}
			
			.xianName{
			    display: inline-block !important;
			    margin-left: 20px;
			    margin-right: 5px;
			}
			
			.zhuangCard,.xiangCard{
				display: inline-block;
			}
			
			#bjlData{
			       display: flex;
   				 font-size: 14px;
   				 margin-bottom: 20px;
			}
			
			#bjlData table {
			    font-size: 12px;
			    width: 100%;
			    border-spacing: 0;
			    border-collapse: collapse;
			}
			
			#bjlData table thead tr td {
			    border: 1px solid #999;
			    width: 50%;
			}
			
			#bjlData table thead tr td .content {
			    display: -ms-flexbox;
			    display: flex;
			    -ms-flex-direction: row;
			    flex-direction: row;
			    -ms-flex: 1 1;
			    flex: 1 1;
			    height: 38px;
			    -ms-flex-align: center;
			    align-items: center;
			    -ms-flex-pack: center;
			    justify-content: center;
			}
			
			#bjlData table tbody tr td div {
			    display: -ms-flexbox;
			    display: flex;
			    -ms-flex: 1 1;
			    height: 60px;
			    -ms-flex-align: center;
			    align-items: center;
			    -ms-flex-pack: center;
			    justify-content: center;
			    font-size: 14px;
			    width: 100%;
			}
			#bjlData thead tr td .content div{
				width:25%;
				text-align: center;
   				font-size: 14px;
   				
			}
			
			#bjlData tbody tr td .content div{
				width:25%;
				text-align: center;
    			font-size: 14px;
			}
			
			#bjlData table tbody tr td {
			    border: 1px solid #999;
			}
			
			
			/*  #bjlData thead tr td .content .dealCard{
			 	border-right: 1px solid #999;	
			 }
			 */
			.Zpuke,.Xpuke{
				justify-content: flex-start !important;
				padding: 0 10px !important;
			}
			
		/* 	.Zpuke{
				border-right: 1px solid #999;	
			} */
			
	   </style>
<main class="outline" id="container"><div class="main zoushi">
  <div class="lotteryNav">
	<div class="kj ssc" role="presentation">
		<div><img src="/pc-static/img/caizhong/58832d203d8bd.png" alt="">时时彩</div>
	</div>
	<div class="kj k3" role="presentation">
		<div><img src="/pc-static/img/caizhong/58832d17e5110.png" alt="">快3</div>
	</div>
	<div class="kj 11x5" role="presentation">
		<div><img src="/pc-static/img/caizhong/58832d0eb40b0.png" alt="">11选5</div>
	</div>
	<div class="kj ssl" role="presentation">
		<div><img src="/pc-static/img/caizhong/58832d05dd133.png" alt="">低频彩</div>
	</div>
	<div class="kj pk10" role="presentation">
		<div><img src="/pc-static/img/caizhong/58832cfb18d58.png" alt="">PK10</div>
	</div>
	<div class="kj pcdd" role="presentation">
		<div><img src="/pc-static/img/caizhong/58832ced965e5.png" alt="">PC蛋蛋</div>
	</div>
	<div class="kj lhc" role="presentation">
		<div><img src="/pc-static/img/caizhong/599aa83b6da0d.png" alt="">六合彩</div>
	</div>
	<div class="kj kl10f" role="presentation">
		<div><img src="/img/caizhong/gdkl10f.png" alt="">快乐十分</div>
	</div>
	
	<div class="kj chess" role="presentation">
		<div><img src="/img/caizhong/chess.png" alt="">棋牌</div>
	</div>
</div>

<div class="hideNav">

</div>

<div class="zoushi_data">
    <!-- <h1><i class="iconfont"></i> 最新彩票开奖结果</h1> -->
    <div class="data">
      <table class="table">
        <thead>
          <tr style="background-color: #e6f5ff;">
            <th>彩种</th>
            <th>期号</th>
            <th>开奖时间</th>
            <th>开奖号码</th>
            <th>开奖频率</th>
            <th>详情</th>
            <th>走势</th>
            <th>购买彩票</th>
          </tr>
        </thead>
        <tbody id="lotters"></tbody>
      </table>
    </div>
  </div>

					<div>
						<div class="kaijiang_header" style="display: none;">
							<div class="title">
								<div class="lotteryType">
									<div id="name"></div>
									<div id="timespace"></div>
									<select id="roomId" style='display:none;'>
										<option value='1'>第一桌</option>
										<option value='2'>第二桌</option>
										<option value='3'>第三桌</option>
										<option value='4'>第四桌</option>
										<option value='5'>第五桌</option>
										<option value='6'>第六桌</option>
									</select>
									<a class="zoushi" ><i class="iconfont icon-icon-test"></i>号码走势</a>
									<a class="rule"><i class="iconfont icon-guize1"></i> 玩法规则</a>
								</div>
								<div style="font-size: 16px;">
									<div style="font-size: 16px;">第
										<select class="historyLotter"></select>期</div>
									<div>
									<div style="margin-right: 10px;">开奖时间:</div>
									<div class="lotterTime"></div>
										
									</div>
								</div>
								<div>
									<div class="lotterNumber">开奖号：<div class="ballContent"></div></div>
									<div class="bjlCard"><div class="zhuangName">庄牌:</div><div class="zhuangCard"></div><div class="xianName">闲牌:</div><div class="xiangCard"></div></div>
									<div>
										<a class="Gotouzhu"  rel="noopener noreferrer">去投注</a>
									</div>
								</div>
							</div>
							 <div class="day_title">
								<div id="lottertimes">
									<div role="presentation" class="active numbers-day-button date">今天</div>
									<div role="presentation" class=" numbers-day-button date">昨天</div>
									<div role="presentation" class=" numbers-day-button date">前天</div>
								</div>
							</div> 
						</div>
						<div class="Eleven" style="display:none">
							<table>
								<thead>
										 <td> 
											<div class="content">
												<div class="KJ_preiod">期号</div>
												<div class="KJ_number">开奖号码</div>
												<div class="KJ_time">开奖时间</div>
											</div>
										</td>
										<td id="second">
											<div class="content">
												<div class="KJ_preiod">期号</div>
												<div class="KJ_number">开奖号码</div>
												<div class="KJ_time">开奖时间</div>
											</div>
										</td>
								</thead>
								<tbody id="lotterData"></tbody>
									</table>
									</div>
								<div id="bjlData" style="display: none;">	 
									<table>
									<thead>
										 <td> 
											<div class="content">
												<div class="KJ_preiod">期号</div>
												<div class="dealCard">庄牌</div>
												<div class="issureCard">闲牌</div>
												<div class="KJ_time">开奖时间</div>
											</div>
										</td>
										
										<td class="nextData"> 
											<div class="content">
												<div class="KJ_preiod">期号</div>
												<div class="dealCard">庄牌</div>
												<div class="issureCard">闲牌</div>
												<div class="KJ_time">开奖时间</div>
											</div>
										</td>
									</thead>
									<tbody id="lotterBjl"></tbody>
										</table>
									</div>	
								</div>
									
</div>
</main>
<script>
/* var cname; */
var type=1;
var error=[];
var issueNumber="";
var shengxiao=["鸡","猴","羊","马","蛇","龙","兔","虎","牛","鼠","猪","狗"]
var SXobj={
		"鸡":["02","14","26","38"],
		"猴":["03","15","27","39"],
		"羊":["04","16","28","40"],
		"马":["05","17","29","41"],
		"蛇":["06","18","30","42"],
		"龙":["07","19","31","43"],
		"兔":["08","20","32","44"],
		"虎":["09","21","33","45"],
		"牛":["10","22","34","46"],
		"鼠":["11","23","35","47"],
		"猪":["12","24","36","48"],
		"狗":["01","13","25","37","49"],
}

$.post('/syLotterr.do',{},function(data){    //n拿全部彩种开奖信息（入口，第一步）
	var data = data.data;
	$("div").data("data",data)
	var lotters = $('#lotters');
	var tr = '';
	var state=0;
	for(var i in data){
		var item=data[i]
		var lotterName=item.classt.split(" ")[0]
		if(lotterName==cname){
			$("#header").contents().find("#headNav").find(".draw").addClass("active").parent().siblings().find("a").removeClass("active");	
			var lotterType=item.classt.split(" ")[2];
			if(lotterType=="115"){
				lotterType="11x5"
			}
			$(".lotteryNav").find("."+lotterType).addClass("active");
			bindLotterType(lotterType)
			for(j=0;j<$(".hideNav .czf").length;j++){
				if($(".hideNav .czf").eq(j).attr("data-cname")==cname){
					$(".hideNav .czf").eq(j).addClass("active")
					findOnelotter(cname)
				}
			}
		}
		if(item.cname=='bjl'){
			
		}else{
			if(item.state==0){
				error.push(item.cname)
			}
		tr+="<tr class='"+data[i].cname+"' nid='1'><td>"+data[i].name+"</td><td>"+data[i].period+"</td><td>"+data[i].lottertime+"</td>";
		var lotterNumber = data[i].lotternumber.split(',');
		tr+="<td><div class='prizeNumber'>";
		for(j=0;j<lotterNumber.length-1;j++){
			if(item.cname=="2fpk10" || item.cname=="bjpk10"  || item.cname=="xysm"  || item.cname=="xyft" || item.cname=="2fft"){
				tr+="<div class='ball qiu"+Number(lotterNumber[j])+"'>"+lotterNumber[j]+"</div>"
			} else if(item.cname=="xg6hc" || item.cname=="5f6hc"){
				if(j==lotterNumber.length-2){
					tr+="<div class='lhc' style='font-size:28px;font-weight:bold;color:black'>+</div>";
				}
				tr+="<div class='lhc'><div class='ball xg"+Number(lotterNumber[j])+"'>"+lotterNumber[j]+"</div>"
				for(y=0;y<shengxiao.length;y++){
					var ZMitem=shengxiao[y]
					if(SXobj[ZMitem].indexOf(lotterNumber[j])!=-1){
						tr+="<div class='lhc'>"+ZMitem+"</div></div>"
					}
				}
			} else if(item.cname=="ahk3" || item.cname=="gxk3" || item.cname=="jsk3" || item.cname=="3fk3" || item.cname=="bjk3" || item.cname=="2fk3"){
				tr+="<div class='ball sz"+lotterNumber[j]+"'></div>"
			}else{
				tr+="<div class='ball qiu8'>"+lotterNumber[j]+"</div>"
			} 
		}
		var time=data[i].timespace/60
		if(time<60){
			time=time+"分"
		}
		else if(time>=60 && time<1440){
			time=time/60+"小时"
		}else if(time>=1440){
			time=time/60/24+"天"
		}
		tr+="</div><td class='time'>"+time+"</td><td><a class='xq'>"
		+"<i class='iconfont icon-guize1'></i></a></td><td><a class='zs'><i class='iconfont icon-icon-test'></i></a></td>"
		if(item.state==0){
			tr+="<td><a 'lotterDisable()' class='bet'>投注</a></td></tr>"
		}else{
			tr+="<td><a onclick='goLotterPage(\""+item.cname+"\")' class='bet'>投注</a></td></tr>";
		}
	}
	}
	lotters.html(tr);
	
	/* 详情和走势的跳转 */
	$("#lotters tr td").on("click",function(){
		if($(this).find(".xq").length==1){
			 cname=$(this).parent().attr("class");
			 if(error.indexOf(cname)!=-1){
				 lotterDisable()
			 }else{
				 findOnelotter(cname) 
			 }
		}
		else if($(this).find(".zs").length==1){
			cname=$(this).parent().attr("class");
			loadPage('/pc/trendChart.do')
		}
	})
});


$(".lotteryNav .kj").on("click",function(){ //彩种切换，显示不同彩种的彩种信息  （第二步）
	$(this).addClass("active").siblings("div").removeClass("active");   
	var type=$(this).attr("class").split(" ")[1];
	if(type!='chess'){    /* 点击的不是棋牌 */
		if(type=="k3"){
			type="kuai3"
		}else if(type=="11x5"){
			type="115"
		}
		bindLotterType(type)
	}else{  /* 目前只有百家乐 */
		var $noticeList = $(".hideNav")
		$noticeList.html("")
		var html = "<div class='czf' data-cname='bjl'><img src='/img/caizhong/bjl.png' alt=''>"+
		"<a>百家乐</a>"+
		"</div>"
		$noticeList.append(html)
	}
	
})	



function bindLotterType(type){  //显示每种类型的彩种 
	var data = $("div").data(data)
	 var $noticeList = $(".hideNav")
	$noticeList.html("")
	for(var i = 0;i < data.data.length;i++){
		var arr = data.data[i].classt.split(" ")
		if(arr[2] == type){
			var html = newActiveItem(data.data[i])
			$noticeList.append(html)
		}
	} 
}

function newActiveItem(item) {
	if(error.indexOf(item.cname)!=-1){
		var html = "<div class='czf' data-cname='"+item.cname+"'><img src='/img/caizhong/gray_"+item.img+".png' alt=''>"+
		"<a>"+item.name+"</a>"+
		"</div>"
	}else{
		var html = "<div class='czf' data-cname='"+item.cname+"'><img src='/img/caizhong/"+item.img+".png' alt=''>"+
		"<a>"+item.name+"</a>"+
		"</div>"
	}
	return html
}

$('.hideNav').on('click','.czf',function(){
	$(this).addClass("active").siblings().removeClass("active")
	cname = $(this).data('cname');
	if(error.indexOf(cname)!=-1){
		lotterDisable()
	}else{
		findOnelotter(cname)
	}
}); //点击彩种显示单个彩种信息（第三步）
/* findOnelotter(cname) */


function findOnelotter(cname){  //显示单个彩种的信息
	$(".zoushi_data").hide();
	$(".kaijiang_header").show();
	if(cname=='bjl'){
		$('#name').text("百家乐")
		$('#timespace').text("1分一期")
		$("#roomId").show();
		$(".Eleven").hide();
		$(".lotterNumber").hide();
		$(".lotteryType .zoushi").hide();
		$(".lotteryType .rule").hide();
		$(".bjlCard").show();
		$("#bjlData").show();
		bjlDrawJl()
		
		/* 切换桌号 */
		$("#roomId").change("click",function(){
			bjlDrawJl()
		})
		
		/* 日期查询 */
		$("#lottertimes div").on("click",function(){
			type=$(this).index()+1;
			bjlDrawJl();
		})
	}else{
		$(".Eleven").show();
		$("#roomId").hide();
		$("#bjlData").hide();
		$(".bjlCard").hide();
		$(".lotterNumber").show();
		$(".lotteryType .zoushi").show();
		$(".lotteryType .rule").show();
		var data = $("div").data(data)
		for(var i = 0;i < data.data.length;i++){
			if(data.data[i].cname==cname){
				$('#name').text(data.data[i].name);
				$('#timespace').text("【"+Number(data.data[i].timespace)/60+"分一期】");
			}
		}
		LotterSwitch()
	} 
}

/* bjl显示全部开奖数据  */
function bjlDrawJl(){  
	var newData;
	var index=0;
	$.post('/datas/findTrendBjl.do',{type:type,tableNumber:$("#roomId").val(),issueNumber: "" },function(result){
		newData=result.data;
		if(newData==""){
			return;
		}
		var options='';
		$('.historyLotter').empty();
		for(i=0;i<newData.length;i++){
			options+="<option value="+i+">"+newData[i].issueNumber+"</option>";
		}
		$('.historyLotter').html(options);
		
		bjlOneDrawJl(newData[index]) 
		bjlDataJl(newData)
	})
	
	$(".historyLotter").change(function(){
		index=$(this).val();
		if(cname=="bjl"){
			bjlOneDrawJl(newData[index]) 
		}
	})
}

function bjlDataJl(data){
	var tbody ='';
	var is =100;
	if(data.length<100){
		is=data.length;
	}
	
	if(data.length>1){
		$(".nextData").show();
	}else{
		$(".nextData").hide();
	}
	if(data.length==0){
		$('#lotterBjl').html("<tr><td style='height:40px;line-height:40px;text-align:center;'>暂无数据</td></tr>")
	}else{
		for(i=0;i<is;i++){
			var item=data[i]
			var time=data[i].openingTimeOfTheCurrentAward.split(" ")[1]
			var zhuangCard="";
			var xianCard="";
			zhuangCard+="<img class='pukeCard' src='/img/caizhong/bjl/" + item.zhuang1 + ".png' /><img class='pukeCard' src='/img/caizhong/bjl/" + item.zhuang2 + ".png' />"
			if(item.dealerCard!=null){
				zhuangCard+="<img class='pukeCard' src='/img/caizhong/bjl/" + item.dealerCard + ".png' />";
			}
			
			xianCard+="<img class='pukeCard' src='/img/caizhong/bjl/" + item.leisure1 + ".png' /><img class='pukeCard' src='/img/caizhong/bjl/" + item.leisure2 + ".png' />"
			if(item.leisureCard!=null){
				xianCard+="<img class='pukeCard' src='/img/caizhong/bjl/" + item.leisureCard + ".png' />";
			}
			 if(i%2==0){
				tbody+="<tr><td><div class='content'><div class='kj_period'>"+item.issueNumber+"</div><div class='Zpuke'>"+zhuangCard+"</div><div class='Xpuke'>"+xianCard+"</div><div class='kj_time'>"+time+"</div></td>"
			}else{
				tbody+="<td><div class='content'><div class='kj_period'>"+item.issueNumber+"</div><div class='Zpuke'>"+zhuangCard+"</div><div class='Xpuke'>"+xianCard+"</div><div class='kj_time'>"+time+"</div></td></tr>"
			} 
		}
		$('#lotterBjl').html(tbody);
	}
}

/* bjl根据旗号显示单个开奖数据  */
function bjlOneDrawJl(newData){
		$('.lotterTime').text(newData.openingTimeOfTheCurrentAward); 
		var xianHtml="";
		var zhuangHtml="";
		zhuangHtml+="<img class='pukeCard' src='/img/caizhong/bjl/" + newData.zhuang1 + ".png' /><img class='pukeCard' src='/img/caizhong/bjl/" + newData.zhuang2 + ".png' />"
		if(newData.dealerCard!=null){
			zhuangHtml+="<img class='pukeCard' src='/img/caizhong/bjl/" + newData.dealerCard + ".png' />";
		}
		
		xianHtml+="<img class='pukeCard' src='/img/caizhong/bjl/" + newData.leisure1 + ".png' /><img class='pukeCard' src='/img/caizhong/bjl/" + newData.leisure2 + ".png' />"
		if(newData.leisureCard!=null){
			xianHtml+="<img class='pukeCard' src='/img/caizhong/bjl/" + newData.leisureCard + ".png' />";
		}
		$(".zhuangCard").html(zhuangHtml)
		$(".xiangCard").html(xianHtml)
}

function LotterSwitch(){
	$.post('/caizhongjl.do',{cname:cname},function(result){
		var data = result.data;
		var options='';
		for(i=0;i<data.length;i++){
			options+="<option value="+data[i].period+">"+data[i].period+"</option>";
		}
		$('.historyLotter').html(options);
		bindOneData(data[0],data[0].lotternumber.split(","))
		KaiJiangjl(data)
		$('.historyLotter').on('change',function(){
			var period=$(this).val(); 
			for(i=0;i<data.length;i++){
				if(data[i].period==period){
					var lotternumber=data[i].lotternumber.split(",")
					bindOneData(data[i],lotternumber)
				}
			}
		});
	})
}

function bindOneData(data,lotternumber1){  //展示单个彩种信息
	var tbody=""
	for(j=0;j<lotternumber1.length-1;j++){
		if(data.cname=='bjl'){
			return;
		}
		if(data.cname=="2fpk10" || data.cname=="bjpk10"  || data.cname=="xysm"  || data.cname=="xyft" || data.cname=="2fft"){
			tbody+="<span class='ball qiu"+Number(lotternumber1[j])+"'>"+lotternumber1[j]+"</span>"
		} else if(data.cname=="xg6hc" || data.cname=="5f6hc"){
			if(j==lotternumber1.length-2){
				tbody+="<span style='font-size:28px;font-weight:bold;color:black;margin-top: 5px;'>+</span>";
			}
			tbody+="<div class='type_lhc'><span class='ball xg"+Number(lotternumber1[j])+"'>"+lotternumber1[j]+"</span>"
			for(y=0;y<shengxiao.length;y++){
				var ZMitem=shengxiao[y]
				if(SXobj[ZMitem].indexOf(lotternumber1[j])!=-1){
					tbody+="<span>"+ZMitem+"</span></div>"
				}
			}
		} else if(data.cname=="ahk3" || data.cname=="gxk3" || data.cname=="jsk3" || data.cname=="3fk3" || data.cname=="bjk3" || data.cname=="2fk3"){
			tbody+="<span class='ball sz"+lotternumber1[j]+"'></span>"
		}else{
			tbody+="<span class='ball qiu8'>"+lotternumber1[j]+"</span>"
		} 
	}
	$('.ballContent').html(tbody);
	 $('.lotterTime').text(data.lottertime); 
	 if(data.cname=="xg6hc" || data.cname=="5f6hc"){
		 $(".ballContent").css("width","50%")
		  $(".ballContent").css("height","52px")
	 }else{
		 $(".ballContent").css("width","80%")
		  $(".ballContent").css("height","38px") 
	 }
}

$('#lottertimes').on('click','.date',function(){ //按日期查询开奖记录
	$(this).addClass("active").siblings().removeClass("active")
	var index=$(this).index()+1;
	if(cname=="bjl"){
		return;
	}
	$.post('/lotterDatas.do',{cname:cname,type:index},function(result){
		var data = result.data;
		 KaiJiangjl(data) 
	});
});

function KaiJiangjl(data){
	console.log(data,'data的值');
	var tbody ='';
	var is =100;
	if(data.length<100){
		is=data.length;
	}
	
	if(data.length>1){
		$("#second").show();
	}else{
		$("#second").hide();
	}
	if(data.length==0){
		$('#lotterData').html("<tr><td style='height:40px;line-height:40px;text-align:center;'>暂无数据</td></tr>")
	}else{
		for(i=0;i<is;i++){
			console.log(data[i].lotternumber)
			var lotternumber=data[i].lotternumber.split(",")
			var item=data[i]
			var time=data[i].lottertime.split(" ")[1]
			 if(i%2==0){
				tbody+="<tr><td><div class='content "+item.cname+"'><div class='kj_period'>"+data[i].period+"</div><div class='kj_number'>"
			}else{
				tbody+="<td><div class='content "+item.cname+"'><div class='kj_period'>"+data[i].period+"</div><div class='kj_number'>"
			} 
			for(j=0;j<lotternumber.length-1;j++){
				if(item.cname=="2fpk10" || item.cname=="bjpk10"  || item.cname=="xysm"  || item.cname=="xyft" || item.cname=="2fft"){
					tbody+="<span class='ball qiu"+Number(lotternumber[j])+"'>"+lotternumber[j]+"</span>"
				} else if(item.cname=="xg6hc" || item.cname=="5f6hc"){
					if(j==lotternumber.length-2){
						tbody+="<span style='font-size:16px;font-weight:bold;color:black'>+</span>";
					}
					tbody+="<div class='type_lhc'><span class='ball xg"+Number(lotternumber[j])+"'>"+lotternumber[j]+"</span>"
					for(y=0;y<shengxiao.length;y++){
						var ZMitem=shengxiao[y]
						if(SXobj[ZMitem].indexOf(lotternumber[j])!=-1){
							tbody+="<span>"+ZMitem+"</span></div>"
						}
					}
				} else if(item.cname=="ahk3" || item.cname=="gxk3" || item.cname=="jsk3" || item.cname=="3fk3" || item.cname=="bjk3" || item.cname=="2fk3"){
					tbody+="<span class='ball sz"+lotternumber[j]+"'></span>"
				}else{
					tbody+="<span class='ball qiu8'>"+lotternumber[j]+"</span>"
				} 
			} 
			if(i%2==0){
				tbody+="</div><div class='kj_time'>"+time+"</div></td>"
			}else{
				tbody+="</div><div class='kj_time'>"+time+"</div></td></tr>"
			}
		}
		$('#lotterData').html(tbody);
		if(item.cname=="2fpk10" || item.cname=="bjpk10"  || item.cname=="xysm"  || item.cname=="xyft" || item.cname=="2fft" || item.cname=="cqkl10f" || item.cname=="gdkl10f"){
			$(".KJ_preiod").css("width","20%");
			$(".KJ_time").css("width","20%");
			$(".KJ_number").css("width","60%");
			$(".kj_period").css("width","20%");
			$(".kj_time").css("width","20%");
			$(".kj_number").css("width","60%");
		}else{
			$(".KJ_preiod").css("width","30%");
			$(".KJ_time").css("width","30%");
			$(".KJ_number").css("width","40%");
			$(".kj_period").css("width","30%");
			$(".kj_time").css("width","30%");
			$(".kj_number").css("width","40%");
		}
		
		if(item.cname=="xg6hc" || item.cname=="5f6hc"){
			$(".Eleven table tbody tr td div").css("height","48px")
		}else{
			$(".Eleven table tbody tr td div").css("height","38px")
		}
	}
}

$(".lotteryType .zoushi").on("click",function(){
	loadPage("/pc/trendChart.do")
})

$(".lotteryType .rule").on("click",function(){
	loadPage("/pc/rule.do")
})

$(".kaijiang_header .Gotouzhu").on("click",function(){
	if(cname=="bjl"){
		 $(".kaijiang_header .Gotouzhu").attr("href","/pc/bjl.do")
	}else{
		goLotterPage(cname)
	}
	 
})

/* 提示该彩种已禁用的方法 */
	function lotterDisable(){
		bindLayerLittle("温馨提示","该彩种维护中,暂未开放")
	}
</script>

